<!doctype html>
<style>
body { overflow:hidden; }
.editing {
    border: solid red 50px;
    font-size: 24px;
    line-height: 48px;
    padding: 24px;
    margin: 64px;
    width: 600px;
}
</style>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<body>
<div contenteditable class="editing">
<div id="sample"></div>
Hello
<table><tr><td></td></tr></table>
<br>
</div>
<div id="log"></div>
<script>
test(function() {
    var selection = window.getSelection();
    var sample = document.getElementById('sample');
    selection.collapse(sample, 0);
    document.execCommand('selectAll');
    var hello = sample.nextSibling;
    var editing = document.querySelector('.editing');
    assert_equals(selection.anchorNode, hello, 'anchorNode');
    assert_equals(selection.anchorOffset, 1, 'anchorOffset');
    assert_equals(selection.focusNode, editing, 'focusNode');
    assert_equals(selection.focusOffset, 5, 'focusOffset');
}, 'overflow:hidden does not affect select-ability');
</script>
